import request from '../utils/request';
import constant from '../constant/constant'
import qs from 'qs';

/**
 * 获取测试机构所要操作的技术列表
 */
export function getTestTechnologyTableDataByMechanismId(payload){
    let option = {
        method: 'POST',
        body: qs.stringify(payload),
        headers: {
		    "Content-Type": "application/x-www-form-urlencoded"
		},
		mode: "cors",
    } 

    return request(constant.serverUrl+'/tvs/api/verification/onvertechnology/testMechanismId/list',option)
}

/**
 * 获取验证验证机所要操作的技术列表
 */
export function getVerificationTechnologyTableDataByMechanismId(payload){
    let option = {
        method: 'POST',
        body: qs.stringify(payload),
        headers: {
		    "Content-Type": "application/x-www-form-urlencoded"
		},
		mode: "cors",
    } 

    return request(constant.serverUrl+'/tvs/api/verification/onvertechnology/verificationMechanismId/list',option)
}

/**
 * 根据用户id获取绑定的机构信息
 */
export function getMechanismByMechanismId(payload){
    let option = {
        method: 'POST',
        body: qs.stringify(payload),
        headers: {
		    "Content-Type": "application/x-www-form-urlencoded"
		},
		mode: "cors",
    } 

    return request(constant.serverUrl+'/tvs/api/mechanism/infoandstatus/mechanismId',option)
}

/**
 * 机构用户上传机构信息
 */
export function uploadMechanismInformation(payload){
    let option = {
        method: 'POST',
        body: payload,
        headers: {
	    },
		mode: "cors",
    } 
    return request(constant.serverUrl+'/tvs/api/mechanism/attachments/create',option)
}